var redirect = function() {
    FB.init({
        appId  : 187809174573734,
        status : true,
        cookie : true,
        xfbml  : true
    });
    FB.getLoginStatus(function(response) {
        if (response.session) {
            /*FB.api('/me', function(response) {
                //alert(response.name);
                //window.location = "mainPage.xhtml"
            });*/
            document.getElementById("form:facebookUID").value = "cenas";
        } else {
            alert("Out");
            //return "index";
        }
    })
}